package com.qf.controller;

import com.qf.domain.User;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
@RequestMapping("/json")
public class JsonController {
    @GetMapping("/testGet")
    public User testGet(){
        User user = new User();
        user.setId(5);
//        user.setName("郭旭东");
        user.setSex("男");
        user.setBirthday(new Date());
        user.setMoney(100.0);
        return user;
    }
    @PostMapping("/testPost")
    public String testPost(@RequestBody User user){
        System.out.println(user);
        return "success";
    }
}
